<template>
    <div>
        <Modal v-model="modal.search" title="高级搜索" width="1020">
            <Form ref="searchForm" :model="searchForm" :label-width="120">
                <Row>
	<i-col span="12">
	<FormItem label="订单编号"><Row>
	<i-col span="11">
	<FormItem prop="idMin">
	<InputNumber v-model="searchForm.idMin" placeholder="请输入开始订单编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="idMax">
	<InputNumber v-model="searchForm.idMax" placeholder="请输入结束订单编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="用户编号"><Row>
	<i-col span="11">
	<FormItem prop="userIdMin">
	<InputNumber v-model="searchForm.userIdMin" placeholder="请输入开始用户编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="userIdMax">
	<InputNumber v-model="searchForm.userIdMax" placeholder="请输入结束用户编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="店铺编号"><Row>
	<i-col span="11">
	<FormItem prop="shopIdMin">
	<InputNumber v-model="searchForm.shopIdMin" placeholder="请输入开始店铺编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="shopIdMax">
	<InputNumber v-model="searchForm.shopIdMax" placeholder="请输入结束店铺编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="订单号" prop="orderNo" label-for="orderNo">
	<Input v-model="searchForm.orderNo" element-id="orderNo" placeholder="请输入订单号" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="订单金额（元）"><Row>
	<i-col span="11">
	<FormItem prop="totalAmountMin">
	<InputNumber v-model="searchForm.totalAmountMin" placeholder="请输入开始订单金额（元）" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="totalAmountMax">
	<InputNumber v-model="searchForm.totalAmountMax" placeholder="请输入结束订单金额（元）" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="实付金额（元）"><Row>
	<i-col span="11">
	<FormItem prop="payAmountMin">
	<InputNumber v-model="searchForm.payAmountMin" placeholder="请输入开始实付金额（元）" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="payAmountMax">
	<InputNumber v-model="searchForm.payAmountMax" placeholder="请输入结束实付金额（元）" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="优惠金额（元）"><Row>
	<i-col span="11">
	<FormItem prop="discountAmountMin">
	<InputNumber v-model="searchForm.discountAmountMin" placeholder="请输入开始优惠金额（元）" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="discountAmountMax">
	<InputNumber v-model="searchForm.discountAmountMax" placeholder="请输入结束优惠金额（元）" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="赠送积分"><Row>
	<i-col span="11">
	<FormItem prop="integralAmountMin">
	<InputNumber v-model="searchForm.integralAmountMin" placeholder="请输入开始赠送积分" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="integralAmountMax">
	<InputNumber v-model="searchForm.integralAmountMax" placeholder="请输入结束赠送积分" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="运费（元）"><Row>
	<i-col span="11">
	<FormItem prop="expressFeeMin">
	<InputNumber v-model="searchForm.expressFeeMin" placeholder="请输入开始运费（元）" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="expressFeeMax">
	<InputNumber v-model="searchForm.expressFeeMax" placeholder="请输入结束运费（元）" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
<FormItem label="订单状态" prop="orderStatus">
    
        <Select v-model="searchForm.orderStatus" placeholder="订单状态" filterable clearable>
          <Option
            v-for="(option, index) in orderStatusSelect"
            :value="option.value"
            :key="index"
          >{{option.displayValue}}</Option>
        </Select>
    
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="支付时间"><Row>
	<i-col span="11">
	<FormItem prop="payTimeMin">
	<DatePicker @on-change="searchForm.payTimeMin=$event" :value="searchForm.payTimeMin" placeholder="请输入开始支付时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="payTimeMax">
	<DatePicker @on-change="searchForm.payTimeMax=$event" :value="searchForm.payTimeMax" placeholder="请输入结束支付时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="支付方式" prop="payType">
	    
	        <Select v-model="searchForm.payType" placeholder="支付方式" filterable clearable>
	          <Option
	            v-for="(option, index) in payTypeSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="支付订单号" prop="transactionNo" label-for="transactionNo">
	<Input v-model="searchForm.transactionNo" element-id="transactionNo" placeholder="请输入支付订单号" clearable/>
</FormItem>
</i-col><i-col span="12">
<FormItem label="是否支付成功" prop="paySuccess">
	    
	        <Select v-model="searchForm.paySuccess" placeholder="是否支付成功" filterable clearable>
	          <Option
	            v-for="(option, index) in paySuccessSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
	
</i-col>

	<i-col span="12">
	<FormItem label="发货时间"><Row>
	<i-col span="11">
	<FormItem prop="deliverTimeMin">
	<DatePicker @on-change="searchForm.deliverTimeMin=$event" :value="searchForm.deliverTimeMin" placeholder="请输入开始发货时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="deliverTimeMax">
	<DatePicker @on-change="searchForm.deliverTimeMax=$event" :value="searchForm.deliverTimeMax" placeholder="请输入结束发货时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="成交时间"><Row>
	<i-col span="11">
	<FormItem prop="dealTimeMin">
	<DatePicker @on-change="searchForm.dealTimeMin=$event" :value="searchForm.dealTimeMin" placeholder="请输入开始成交时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="dealTimeMax">
	<DatePicker @on-change="searchForm.dealTimeMax=$event" :value="searchForm.dealTimeMax" placeholder="请输入结束成交时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="订单备注" prop="remark" label-for="remark">
	<Input v-model="searchForm.remark" element-id="remark" placeholder="请输入订单备注" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="商家备注" prop="shopRemark" label-for="shopRemark">
	<Input v-model="searchForm.shopRemark" element-id="shopRemark" placeholder="请输入商家备注" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="版本号"><Row>
	<i-col span="11">
	<FormItem prop="versionMin">
	<InputNumber v-model="searchForm.versionMin" placeholder="请输入开始版本号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="versionMax">
	<InputNumber v-model="searchForm.versionMax" placeholder="请输入结束版本号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="创建时间"><Row>
	<i-col span="11">
	<FormItem prop="createTimeMin">
	<DatePicker @on-change="searchForm.createTimeMin=$event" :value="searchForm.createTimeMin" placeholder="请输入开始创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="createTimeMax">
	<DatePicker @on-change="searchForm.createTimeMax=$event" :value="searchForm.createTimeMax" placeholder="请输入结束创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="更新时间"><Row>
	<i-col span="11">
	<FormItem prop="updateTimeMin">
	<DatePicker @on-change="searchForm.updateTimeMin=$event" :value="searchForm.updateTimeMin" placeholder="请输入开始更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="updateTimeMax">
	<DatePicker @on-change="searchForm.updateTimeMax=$event" :value="searchForm.updateTimeMax" placeholder="请输入结束更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>
	<i-col span="12">
	<FormItem label="是否激活" prop="isActive">
	    
	        <Select v-model="searchForm.isActive" placeholder="是否激活" filterable clearable>
	          <Option
	            v-for="(option, index) in isActiveSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col>
</Row>

            </Form>
            <div slot="footer">
                <Button type="text" size="large" @click="resetForm">清空</Button>
                <Button type="text" size="large" @click="cancelModal">取消</Button>
                <Button type="primary" size="large" @click="searchOkModal" :loading="loading.search">查询</Button>
            </div>
        </Modal>
    </div>
</template>

<script>
    import * as utils from '@/api/utils-v2'
    import * as ResponseStatus from '@/api/response-status'
    export default {
        name: 'GoodsOrderSearch',
        data() {
            return {
                modal: {
                    search: false
                },
                loading: {
                    search: false
                },
				dataDictCodes: ['IS_ACTIVE','PAYMENT_TYPE','GOODS_PAYSUCCESS','GOODS_ORDER_STATUS'],
				dataDictItems: {},
				isActiveSelect:[],
				payTypeSelect:[],
				paySuccessSelect:[],
				orderStatusSelect:[],
                urls: {
                    searchUrl: '/goods-order/admin/pager-cond'
                },
                searchForm: {
                    pageNo: 1,
                    pageSize: 10,
                    sortColumn: null,
                    sortOrder: null,
                    id: null,
idMin: null, 
idMax: null, 
userId: null,
userIdMin: null, 
userIdMax: null, 
shopId: null,
shopIdMin: null, 
shopIdMax: null, 
orderNo: null,
totalAmount: null,
totalAmountMin: null, 
totalAmountMax: null, 
payAmount: null,
payAmountMin: null, 
payAmountMax: null, 
discountAmount: null,
discountAmountMin: null, 
discountAmountMax: null, 
integralAmount: null,
integralAmountMin: null, 
integralAmountMax: null, 
expressFee: null,
expressFeeMin: null, 
expressFeeMax: null, 
orderStatus: null,
orderStatusMin: null, 
orderStatusMax: null, 
payTime: null,
payTimeMin: null, 
payTimeMax: null, 
payType: null,
payTypeMin: null, 
payTypeMax: null, 
transactionNo: null,
paySuccess: null,
paySuccessMin: null, 
paySuccessMax: null, 
deliverTime: null,
deliverTimeMin: null, 
deliverTimeMax: null, 
dealTime: null,
dealTimeMin: null, 
dealTimeMax: null, 
remark: null,
shopRemark: null,
version: null,
versionMin: null, 
versionMax: null, 
createTime: null,
createTimeMin: null, 
createTimeMax: null, 
updateTime: null,
updateTimeMin: null, 
updateTimeMax: null, 
isActive: null,
isActiveMin: null, 
isActiveMax: null, 

                },
            }
        },
        computed: {},
        mounted() {
			            utils.getDataDict(this.dataDictCodes).then(response => {
			              if (response) {
			                this.dataDictItems = response
			                utils.getSelectDictItems(this, 'IS_ACTIVE', 'isActive', 'isActiveSelect')
							utils.getSelectDictItems(this, 'PAYMENT_TYPE', 'payType', 'payTypeSelect')
							utils.getSelectDictItems(this, 'GOODS_PAYSUCCESS', 'paySuccess', 'paySuccessSelect')
							utils.getSelectDictItems(this, 'GOODS_ORDER_STATUS', 'orderStatus', 'orderStatusSelect')
			              }
			            }).catch(error => {
			              console.log(error)
			            })
		},
        methods: {
            resetForm() {
                this.$refs.searchForm.resetFields()
            },
            cancelModal(modal) {
                this.modal.search = false
            },
            searchOkModal(modal) {
                this.modal.search = false
                this.$emit('searchTable', true)
            }
        }
    }
</script>

<style>
</style>
